package com.abel.cloud.provider.service.impl;

import com.abel.cloud.common.po.UserAccountPO;
import com.abel.cloud.provider.dao.UserAccountDao;
import com.abel.cloud.provider.service.UserAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserAccountServiceImpl implements UserAccountService {
    @Autowired
    private UserAccountDao userAccountDao;

    @Override
    public UserAccountPO getUserById(Integer productId) {
        return userAccountDao.getById(productId);
    }

    @Override
    public int updateUserAccount(UserAccountPO user) {
        if(user == null || user.getId() == null){
            return 0;
        }
        return userAccountDao.updateById(user);
    }
}
